<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <!--[if IE]><script src="../assets/javascript/excanvas.js"></script><![endif]-->
        <script type="text/javascript" src="../lib/util.js"></script>
        <script type="text/javascript" src="../lib/primitives.js"></script>
        <script type="text/javascript" src="../lib/style.js"></script>
        <script type="text/javascript" src="../lib/matrix.js"></script>
        <script type="text/javascript" src="../lib/text.js"></script>
        <script type="text/javascript">

            function getCanvas(){
                var canvas = document.getElementById("a");
                return canvas;
            }

            /**Just get the context*/
            function getContext(){
                var canvas = getCanvas();

                if (window.G_vmlCanvasManager != undefined) { // ie IE
                    window.G_vmlCanvasManager.initElement(canvas);
                }
                return canvas.getContext("2d");
            }


            function generate(){
                var output = document.getElementById('output');

                var cc1 = new CubicCurve(new Point(100,100), new Point(200,200), new Point(100,50), new Point(300,100));
                cc1.style.strokeStyle = '#FFAAFF';
                cc1.style.fillStyle = '#00AA00';
                cc1.style.lineWidth = 1;
                
                output.value = cc1.toSVG();
            }
            

        </script>

    </head>
    <body>
    <canvas id="a" style="border: 1px solid gray;" width="20" height="20">no canvas </canvas>
    <input type="button" value="draw" onclick="generate();"/><br />
    <textarea id="output" rows="40" cols="80" id=""></textarea>
</body>
</html>
